package cn.com.surker.lab.dao;

import cn.com.surker.lab.entity.LabExpendOther;
import cn.com.surker.lab.vo.LabExpendOtherVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 工控机手动下料消耗表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-11-05
 */
public interface LabExpendOtherDao extends BaseMapper<LabExpendOther> {

    /**
     * 查询手动总消耗
     * @param storageId 仓位id
     * @param materialId 材料ID
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return
     */
    Double findSumOtherDosage(Long storageId, Long materialId, String startTime, String endTime);

    Double findCloudSumOtherDosage(String dbCode, Long storageId, Long materialId, String startTime, String endTime);

	Date findMaxTime(Long lineId);

	/**
	 * 查询完整的数据
	 *
	 * @param qwOther
	 * @return
	 */
	List<LabExpendOtherVo> findFullList(@Param(Constants.WRAPPER) QueryWrapper<LabExpendOther> qwOther);
}
